<template>
  <div class="legend">
    <div class="title">图 例</div>
    <div class="content">
      <el-row type="flex">
        <el-col
          class="img-item"
          v-for="(item, index) in legendList"
          :key="index"
        >
          <div class="img">
            <img
              :src="require(`@/assets/img/${item.img}.png`)"
              :width="item.width"
            />
          </div>

          <div>{{ item.name }}</div>
        </el-col>
      </el-row>
      <el-row type="flex">
        <el-col :span="14" class="legend-row">
          <span>车灯颜色：</span>
          <div class="legend-item">
            <div class="legend-img" style="background:#7CBC44"></div>
            <div>运行</div>
          </div>
          <div class="legend-item">
            <div class="legend-img" style="background:#888F93"></div>
            <div>停止</div>
          </div>
          <div class="legend-item">
            <div class="legend-img" style="background:#6D000E"></div>
            <div>故障</div>
          </div>
          <div class="legend-item">
            <div class="legend-img" style="background:#ECCD54"></div>
            <div>满纱满筒</div>
          </div>
          <div class="legend-item">
            <div class="legend-img" style="background:#EB4E27"></div>
            <div>通讯失败</div>
          </div>
        </el-col>
        <el-col :span="10" class="legend-row"
          ><span>车身颜色：</span>
          <div class="legend-item">
            <div class="legend-img" style="background:#2D69C7"></div>
            <div>&gt;90%</div>
          </div>
          <div class="legend-item">
            <div class="legend-img" style="background:#ECCD54"></div>
            <div>70%-90%</div>
          </div>
          <div class="legend-item">
            <div class="legend-img" style="background:#EB4E27"></div>
            <div>&lt;70%</div>
          </div></el-col
        >
      </el-row>
      <div>
        <span
          >1.尾灯表示车台状态（运行、停止、故障、满纱满筒、通讯失败等）
          2.车身颜色渐变表示车台当前效率范围</span
        >
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      legendList: [
        {
          img: 'luotongji',
          name: '络筒机',
          width: 11
        },
        {
          img: 'xishaji',
          name: '细纱机',
          width: 9
        },
        {
          img: 'cushaji',
          name: '粗纱机',
          width: 45
        },
        {
          img: 'bingtiaoji',
          name: '并条机',
          width: 42
        },
        {
          img: 'shumianji',
          name: '梳棉机',
          width: 11
        },
        {
          img: 'lvchenji',
          name: '滤尘机',
          width: 26
        },
        {
          img: 'zhuamianji',
          name: '抓棉机',
          width: 51
        },
        {
          img: 'duocang',
          name: '多仓',
          width: 17
        },
        {
          img: 'jingkaimian',
          name: '精开棉',
          width: 46
        },
        {
          img: 'dongligui',
          name: '动力柜',
          width: 41
        },
        {
          img: 'wendu',
          name: '温湿度表',
          width: 42
        }
      ]
    };
  }
};
</script>

<style lang="scss" scoped>
@import '~@/assets/css/workshop.scss';
</style>
